home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amoslist.lzh / AMOSLIST / 000066_amos-request@svcs1.digex.net_Mon Sep 4 06:40:47 1995.msg < prev    next >
Internet Message Format  |  1995-10-02  |  4KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id GAA12611;  for  ; Mon, 4 Sep 1995 06:40:46 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id DAA16688 for amos-out; Mon, 4 Sep 1995 03:52:15 -0400
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id DAA16685 for <amos-list@svcs1.digex.net>; Mon, 4 Sep 1995 03:52:14 -0400
  4. Received: from ds1.acs.ucalgary.ca (root@ds1.acs.ucalgary.ca [136.159.34.101]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id DAA07871;  for <amos-list@access.digex.net> ; Mon, 4 Sep 1995 03:52:13 -0400
  5. Received: by acs3.acs.ucalgary.ca (AIX 4.1/UCB 5.64/4.03)
  6.           id AA30982; Mon, 4 Sep 1995 01:51:26 -0600
  7. Message-Id: <9509040751.AA30982@acs3.acs.ucalgary.ca>
  8. Subject: Big Project
  9. To: chris@sixpack.pfalz.org (Chris Hodges)
  10. Date: Mon, 4 Sep 95 1:51:26 MDT
  11. From: "Robert Andrew Currie" <racurrie@acs.ucalgary.ca>
  12. Cc: amos-list@access.digex.net
  13. In-Reply-To: <wSX6SMD261aez2@p22.sixpack.pfalz.org>; from "Chris Hodges" at Sep 3, 95 9:08 am
  14. X-Mailer: ELM [version 2.3 PL11B]
  15. Mime-Version: 1.0
  16. Content-Type: text/plain; charset=US-ASCII
  17. Content-Transfer-Encoding: 7bit
  18. Content-Length: 2577      
  19. Status: RO
  20. X-Status: 
  21.  
  22.     If we are going to create a program by splitting it up
  23. into little procedures there are a few things that must be taken
  24. into account:
  25.  
  26. 1) All procedures must leave the system in the same condition
  27. as when they were initially called. For example you would have to
  28. remember which screen was active and return activeness to that
  29. screen before leaving your procedure. If this is not followed
  30. then one person will be spending many many hours trying to figure
  31. out how to mesh together a bunch of procedures that won't
  32. cooperate--this will not be fun.
  33.  
  34. 2) All procedures will have there own predefined variable or
  35. storage space that only they can access. This will prevent others
  36. from corrupting data. For example one procedure should handle all
  37. sound effects and/or music and be responsible for maintaining the
  38. data space as well as the assosciated variables. In essence it
  39. should resemble object oriented programming except we will be the
  40. only ones enforcing this restriction. Certain public variables
  41. can be changed outside the procedure and these should be declared
  42. as global, all others should be shared within the procedure.
  43.  
  44. 3) An agreed upon documentation standard should be created and
  45. upheld in case there are any small changes that need to be
  46. made. This will also encompass the creation of a procedure list,
  47. maybe daily, which will show the parameters of each completed
  48. procedure--just in case slight changes must be made due to design
  49. flaws or language shortcomings.
  50.  
  51. There are probably more but I can't think at this time. If we
  52. follow the guidelines above then we should emerge with a slightly
  53. robust game engine which may require more memory and be a slight bit
  54. slower than a game designed by an individual but it should allow
  55. us to create a larger game in a much shorter time span.
  56.  
  57. One thing that I have discovered(at least with Amos Creator) is
  58. that mimicing object oriented programming in Amos makes the
  59. program much smaller and less memory hungry. In order to fake
  60. object oriented language, I use only one paramter in my call to
  61. the procedure:
  62.  
  63. Procedure SOUND[REQUEST$]
  64. Shared CURRENT_VOL,CURRENT_SAM,SOUND_ON
  65. If REQUEST$="Load Sample"
  66. ------
  67. ------
  68. End If
  69. If REQUEST$="Play Sample"
  70. ------
  71. ------
  72. End If
  73. End Proc
  74.  
  75. This not only makes code very readable but it also solidifies
  76. data because only one procedure accesses that data area. If data
  77. must be passed into the procedure then a global variable is
  78. used-- the equivalent of a public variable. Anyways, I sound like
  79. I'm preaching now so I'll shut up and let everyone say what they
  80. think. :)
  81.  
  82.             Robert Currie
  83.  
  84.